<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 复制数组
        const arr1 = [3, 4, 5, 6];
        const arr2 = [...arr1]
        console.log(arr2); // [3, 4, 5, 6]

        //合并数组
        const arr3 = [1, 2, 3];
        const arr4 = [4, 5, 6]
        console.log([99, 98, ...arr3, ...arr4, 100]); //[99, 98, 1, 2, 3, 4, 5, 6, 100]

        //字符串转为数组
        console.log(...
                'Cai') //C a i
        console.log([...
                'Cai'
            ]) //['C', 'a', 'i']
    </script>
</body>

</html>